<?php
class Instructor extends AppModel {
	var $name = 'Instructor';
	var $useTable = 'instructores';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'persona_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'telefonos' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '255')
			)
		),
		'disponibilidad' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '500')
			)
		),
		'observacion' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '500')
			)
		),
		'activo' => array(
			'boolean' => array(
				'rule' => array('boolean')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
	);

	var $belongsTo = array(
		'Persona' => array(
			'className' => 'Persona',
			'foreignKey' => 'persona_id'
		)
	);
function parentNode() {
		return null;
	}
}
?>
